{% extends "layout.html.twig" %}

{% block title "book" %}

{% block content %}

			<h2>SELV Pinnwand <span id="aj-set-image"><img src="/bundles/acmeperson/images/ajax-loader.gif" /></span></h2>
			<form>
			<p style="margin-bottom:2px;"><textarea name="pinnwand" class="form-control" rows="2" placeholder="Was machst Du als SELV ?"></textarea></p>
			<p><button type="submit" class="btn btn-primary" id="submit-pinnwand">Senden</button> <button type="submit" class="btn btn-primary" id="submit-pinnwand-images">Bilder upload</button></p>
			</form>
			<div class="pinnwand">
			<h1>SELV Einträge</h1>

			{% for pinnwand in pinnwands %}
				{% if pinnwand|length == 1 %}
					{% for pinnw in pinnwand %}
						<div class="row pinnwand-kommentar" >
							<div class="col-md-2"><a href="{{ path('user_info') }}/{{ pinnw.user_id }}"><img class="img-responsive" src="/{{ pinnw.path }}pinnwand/{{ pinnw.image }}" /></a></div>
							<div class="col-md-10"><span><a style="text-decoration:none; color:#000000;" id="#{{ pinnw.firstname }}{{ pinnw.created_at }}" name="{{ pinnw.firstname }}{{ pinnw.created_at }}">{{ pinnw.firstname }} hat am {{ pinnw.created_at }} geschrieben</a></span><br />
								<div style="padding-bottom:5px;">{{ pinnw.text|nl2br }}</div>
									{% for pinnim in pinnw.piwandpath %}
										<div style="padding-left:0px; padding-bottom:10px;" class="col-md-3">
											<a href="{{ pinnim.lightbox }}" data-lightbox="{{ pinnim.galeriename }}">
												<img class="img-responsive" src="{{ pinnim.preview }}" />
											</a>
										</div>
									{% endfor %}			
							</div>
						</div>
						<div class="row pinnwand-texarea">
							<p style="margin-bottom:1px;"><textarea name="pinnwand" class="form-control" rows="1" id="kommentar_{{ pinnw.id }}" placeholder="Dein Kommentar dazu"></textarea></p>
							<p><button style="padding:3px 6px; font-size:12px;" type="submit" class="btn btn-primary submit-kommentar" id="btn_{{ pinnw.id }}">Kommentar</button> <span style="display:none;" id="aj-set-image_{{ pinnw.id }}"><img src="/bundles/acmeperson/images/ajax-loader.gif" /></span></p>
						</div>
					{% endfor %}
				{% else %}
					{% for pinnw in pinnwand %}
						<div class="row pinnwand-kommentar" {% if loop.last == false %} style="margin:0px;" {% endif %} {% if loop.last == true %} style="margin-bottom:2px;" {% endif %}>
							<div class="col-md-2"><a href="{{ path('user_info') }}/{{ pinnw.user_id }}"><img class="img-responsive" src="/{{ pinnw.path }}pinnwand/{{ pinnw.image }}" /></a></div>
							<div class="col-md-10"><span><a style="text-decoration:none; color:#000000;" id="#{{ pinnw.firstname }}{{ pinnw.created_at }}" name="{{ pinnw.firstname }}{{ pinnw.created_at }}">{{ pinnw.firstname }} hat am {{ pinnw.created_at }} geschrieben</a></span>
								<div style="padding-bottom:5px;">{{ pinnw.text|nl2br }}</div>
									{% for pinnim in pinnw.piwandpath %}
										<div style="padding-left:0px; padding-bottom:10px;" class="col-md-3">
											<a href="{{ pinnim.lightbox }}" data-lightbox="{{ pinnim.galeriename }}">
												<img class="img-responsive" src="{{ pinnim.preview }}" />
											</a>	
										</div>
									{% endfor %}	
							</div>
						</div>
						{% if loop.last == true %}
						<div class="row pinnwand-texarea">
							<p style="margin-bottom:1px;"><textarea name="pinnwand" class="form-control" rows="1" id="kommentar_{{ pinnw.group_id }}" placeholder="Dein Kommentar dazu"></textarea></p>
							<p><button style="padding:3px 6px; font-size:12px;" type="submit" class="btn btn-primary submit-kommentar" id="btn_{{ pinnw.group_id }}">Kommentar</button> <span style="display:none;" id="aj-set-image_{{ pinnw.group_id }}"><img src="/bundles/acmeperson/images/ajax-loader.gif" /></span></p>
						</div>	
						{% endif %}
					{% endfor %}
				{% endif %}
			{% endfor %}
			{% if pinnwandhistory > 0 %}
			<form id="limitFormular" action="{{ path('login_index') }}" method="post">	
				<input type="hidden" name="limitFrom" value="{{ pinnwandhistory }}" />
			</form>
			<a href="" class="history" id="{{ pinnwandhistory }}" >Ältere Einträge</a> <span id="aj-history"><img src="/bundles/acmeperson/images/ajax-loader.gif"></span>			
			{% endif %}
			</div>
	
{% endblock %}









